home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
System Booster
/
System Booster.iso
/
Archives
/
ForCLI
/
0Utils13.lha
/
0Utils
/
GetWord.doc
< prev
next >
Wrap
Text File
|
1995-03-20
|
932b
|
58 lines
NAME
GetWord
SYNOPSIS
GetWord - get one in a list of words - Requires v37
INPUTS
NUMBER/N/A,WORDS/M
FUNCTION
get a number and a couple of strings and
find the n-th string starting with 1.
Negative numbers cause counting with the
last word.
The resulting string is sent to STDOUT.
Numbers, that exceed the number of words,
result in a returncode "10" (so does number=0)
RESULT
word [number-1]
NOTES
CLI - only
should compile with SAS-C
BUGS
there are problems, if GetWord is invoked with
wrong word number in Scripts: for unknown reason
the secondary result is cleared early.
(see .KnownBugs)
The documentation wrongly stated a returncode 9
on wrong numbers.
EXAMPLES
>GetWord 1 ali baba
"ali"
>GetWord -1 ali baba
"baba"
>GetWord 3 ali baba
"GetWord: bad number"
AUTHOR
Bernd Noll, Brunnenstrasse 55, D-67661 Kaiserslautern
noll@student.uni-kl.de